﻿using ChurchDiary.BLL;
using ChurchDiary.TableEntity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace ChurchWebsite.Areas.Admin.Controllers
{
    public class OrganizationMasterController : Controller
    {
        //
        // GET: /Admin/OrganizationMaster/

        public ActionResult Index()
        {
            return View();
        }


        public ActionResult Jobtitle()
        {
            return View();
        }
        #region Jobtitle
        public JsonResult SaveJobTitle(EntityJobtitle Jobtitle)
        {
            BLL_Shared BLL = new BLL_Shared();
            return Json(BLL.AddJobtitle(Jobtitle), JsonRequestBehavior.AllowGet);
        }
        public JsonResult UpdateJobTitle(EntityJobtitle Jobtitle)
        {
            BLL_Shared BLL = new BLL_Shared();
            return Json(BLL.UpdateJobtitle(Jobtitle), JsonRequestBehavior.AllowGet);
        }
        public JsonResult DeleteJobTitle(Guid dataId)
        {
            BLL_Shared BLL = new BLL_Shared();
            return Json(BLL.DeleteJobtitle(dataId), JsonRequestBehavior.AllowGet);
        }
        public JsonResult GetJobTitle(Guid dataId)
        {
            BLL_Shared BLL = new BLL_Shared();
            return Json(BLL.GetJobtitle(dataId), JsonRequestBehavior.AllowGet);
        }
        public JsonResult GetJobTitles(int PageNo, string SearchKey, string Sort, string SortMode, int PerPage)
        {
            BLL_Shared BLL = new BLL_Shared();
            return Json(BLL.GetJobTitles(PageNo, SearchKey, Sort, SortMode, PerPage),JsonRequestBehavior.AllowGet);
        }
        #endregion

    }
}
